<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="common.jsp"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<script type="text/javascript"  src="/static/views/employee.js"></script>
<!DOCTYPE html>
<head>
    <title>员工信息</title>
</head>
<body>
      <table id="employee_datagrid"></table>
      <div id="employee_datagrid_Btn">
        <div>
            <shiro:hasPermission name="employee:save">
                <a class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="employee_add()">新增</a>
            </shiro:hasPermission>
            <shiro:hasPermission name="employee:update">
                <a class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="employee_edit()">编辑</a>
            </shiro:hasPermission>
            <shiro:hasPermission name="employee:delete">
                <a class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="employee_remove()">删除</a>
            </shiro:hasPermission>
                <a class="easyui-linkbutton" iconCls="icon-reload" plain="true" onclick="employee_reload()">刷新</a>




            <div>
                <input id="searchBtn" class="easyui-textbox" data-options="buttonText:'搜索',prompt:'工号,员工名称,邮箱',width:300,label:'关键字:'">
            </div>
        </div>
      </div>
    <%--表单对话框--%>
    <div id="employee_dialog">
        <form id="employee_form" method="post">
            <input type="hidden" name="id">
            <div align="center" style="margin-top:10px">
                <div>
                    <input class="easyui-textbox" name="sn" data-options="label:'员工编号:',labelPosition:'top',required:true,missingMessage:'编号必填'" >
                </div>
                <div>
                    <input class="easyui-textbox" name="name" data-options="label:'员工名称:',labelPosition:'top',required:true,missingMessage:'名称必填'" >
                </div>
                <div>
                    <input class="easyui-textbox" name="password" data-options="label:'员工密码:',labelPosition:'top',required:true,missingMessage:'密码必填'" required>
                </div>
                <div>
                    <input class="easyui-textbox" name="email" data-options="label:'员工邮箱:',labelPosition:'top',required:true,missingMessage:'邮箱必填'" required>
                </div>
                <div>
                    <input class="easyui-textbox" name="age" data-options="label:'员工年龄:',labelPosition:'top',required:true,missingMessage:'年龄必填'" required>
                </div>
                <div>
                    <input  class="easyui-combobox" name="dept.id"  required  data-options="
                    valueField: 'id',
                    textField: 'name',
                    url:'/department/queryDepartmentList',
                    label: '所属部门:',
                    labelPosition: 'top',
                    required:true,missingMessage:'请选择所属部门'
                    ">
                </div>
                <div>
                    <input id="roleId"  class="easyui-combobox"  required  data-options="
                    valueField: 'id',
                    textField: 'name',
                    url:'/role/queryRoleList',
                    label: '角色选择:',
                    multiple:true,
                    labelPosition: 'top',
                    required:true,missingMessage:'请选择角色'
                    ">
                </div>
            <%--定义保存取消按钮--%>
            <div id="employee_dialog_bt">
                    <a class="easyui-linkbutton" iconCls="icon-save"  onclick="employee_save()">保存</a>
                    <a class="easyui-linkbutton" iconCls="icon-cancel" onclick="employee_cancel()">取消</a>
            </div>
            </div>
        </form>
     </div>
</body>
</html>
